import Vue from 'vue'
import VueRouter from 'vue-router'

const Home = () => import('../views/home/home')
const Classify = () => import('../views/classify/classify')
const Shopping = () => import('../views/shopping/shopping')
const Profile = () => import('../views/profile/profile')
const Detail = () => import('../views/detail/Detail')
const Sys = () => import('../views/sys/sys')
Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    redirect: '/home'
  },
  {
    path:'/home',
    component: Home
  },
  {
    path:'/classify',
    component: Classify
  },
  {
    path:'/shopping',
    component: Shopping
  },
  {
    path:'/profile',
    component: Profile
  },
  {
    path:'/detail/:iid',
    component: Detail
  },
  {
    path:'/sys',
    component: Sys
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
